<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('导入配置')"/>
    <script src="/js/jquery.min.js"></script>
    <script type="text/javascript">
        $(function(){
            $.fn.autoHeight = function(){
                function autoHeight(elem){
                    elem.style.height = 'auto';
                    elem.scrollTop = 0; //防抖动
                    elem.style.height = document.body.clientHeight - 80 + 'px';
                }
                this.each(function(){
                    autoHeight(this);
                    $(this).on('keyup', function(){
                        autoHeight(this);
                    });
                });
            }

            $('textarea[autoHeight]').autoHeight();
        })
    </script>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-menu-add">
        <div class="form-group">
            <div class="col-sm-pull-10">
                <textarea style="border: 1px solid #3c8dbc;" autoHeight="true" name="importStr" class="form-control"></textarea>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<script>

    $("#form-menu-add").validate({
        rules: {
            importStr: {
                required: true
            },
        }
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(ctx + "config/center/importStr", $('#form-menu-add').serialize());
        }
    }

</script>
</body>
</html>
